/*
 *  ApiHelper.h
 *  uneed
 *
 *  Created by apple on 3/23/12.
 *  Copyright 2012 __MyCompanyName__. All rights reserved.
 *
 */

#import <Foundation/Foundation.h>

/*
 
 用于发送 HTTP  请求的辅助类 
 封装  POST  请求
 
 */

@interface ApiHelper : NSObject  {
	NSString  * requestUrlPath;
	id  mdelegate;
	SEL doneSelector;
    NSMutableData *reply;
	NSString *mIndex;
	NSURLConnection *connection;
}

@property(nonatomic,retain)NSString *mIndex;
@property(nonatomic,retain)NSMutableData *reply;
@property(nonatomic,retain)NSURLConnection *connection;

-(id)	initWithUrl:(NSString*) urlPath 
		 postData:(NSDictionary*)  data
		 delegate:(id)  aDelegate
		withIndex:(NSString *)theIndex
onCompletedCallback:(SEL) complectedCallback;

-(void)cancelApi;

@end